<?php
class CConfig
{
	static function country_list()
	{
		return array
		(
			array(
				'id'	=> 'vi',
				'name'	=> 'Vietnam'
			),
			array(
				'id'	=> 'th',
				'name'	=> 'Thailand'
			),
			array(
				'id'	=> 'ph',
				'name'	=> 'Philippines'
			),
			array(
				'id'	=> 'ma',
				'name'	=> 'Malaysia'
			),
			array(
				'id'	=> 'id',
				'name'	=> 'Indonesia'
			),
			array(
				'id'	=> 're',
				'name'	=> 'Regional'
			),
		);
	}
	
	static function getCountryName($p_strCountry)
	{
		$arrData = self::country_list();
		foreach ($arrData as $item)
		{
			if($item["id"] == $p_strCountry)
			{
				return $item["name"];
			}
		}
		return "";
	} 
	
	static function getCountryId($p_strCountry)
	{
		$arrData = self::country_list();
		foreach ($arrData as $item)
		{
			if($item["name"] == $p_strCountry)
			{
				return $item["id"];
			}
		}
		return "";
	} 
	
	static function team_list()
	{
		$arrData	= array(
			array('id' => GROUP_Administrator,  'name' => 'Adminstrator'),
			array('id' => GROUP_Buying,	'name' =>'Buying'),
			array('id' => GROUP_Inventory,	'name' =>'Sourcing / Hunting'),
			array('id' => GROUP_Marketing,  'name' =>'Marketing'),
			array('id' => GROUP_Content, 'name'=> 'Content'),
			array('id' => GROUP_Product_It, 'name' => 'Product / It'),
			array('id' => GROUP_Finance, 'name'=>	'Finance'),
			array('id' => GROUP_BI, 'name' => 'BI'),
			array('id' => GROUP_HR, 'name' => 'HR'),
			array('id' => GROUP_GeneralAdministration, 'name' => 'General Administration'),
			array('id' => GROUP_Customer_Service, 'name' => 'Customer Service'),
			array('id' => GROUP_Warehouse_Fulfillment ,	'name' => 'Warehouse / Fulfillment'),
			array('id' => GROUP_Delivery, 		'name' => 'Delivery')
		);
		return $arrData;
	}
  
  static $priviledgeGroup = array(
		  "G0001" => "PARAMETER",
		  "G0002" => "Replenishment",
		  "G0003" => "Configuration",
		  "G0004" => "Archive History"
	  );
	
	static $priviledgeFunction = array(
		  "F0001" => "Upload Data",
		  "F0002" => "Supplier Calendar",
		  "F0003" => "Generate Forecast",
		  "F0004" => "Validate Forecast",
		  "F0005" => "Prepare PO",
		  "F0006" => "View Previous Forecast",
		  "F0007" => "Create / Edit User",
		  "F0008" => "Change Password",
		  "F0009" => "CMS",
		  "F0010" => "Priviledge Management",
		  "F0011" => "View Previous Forecast"
	  );
}
?>